package org.gtug.vg.entities;

import java.io.Serializable;

public final class NewEntity implements Serializable {
	private String newTitle;
	private String newBody;

	public NewEntity(String newTitle, String newBody) {
		this.newBody = newBody;
		this.newTitle = newTitle;
	}

	public String getNewBody() {
		return newBody;
	}

	public void setNewBody(String newBody) {
		this.newBody = newBody;
	}

	public String getNewTitle() {
		return newTitle;
	}

	public void setNewTitle(String newTitle) {
		this.newTitle = newTitle;
	}

	@Override
	public boolean equals(Object o) {
		if (this == o) return true;
		if (!(o instanceof NewEntity)) return false;

		NewEntity newEntity = (NewEntity) o;

		if (newBody != null ? !newBody.equals(newEntity.newBody) : newEntity.newBody != null) return false;
		if (newTitle != null ? !newTitle.equals(newEntity.newTitle) : newEntity.newTitle != null) return false;

		return true;
	}

	@Override
	public int hashCode() {
		int result = newTitle != null ? newTitle.hashCode() : 0;
		result = 31 * result + (newBody != null ? newBody.hashCode() : 0);
		return result;
	}

	@Override
	public String toString() {
		return " * " + newTitle;
	}
}
